<assign name="page_title" value="登录" />
<assign name="current_item" value="login" />
<include file="Public:header" />
<div id="main">
    <div id="main-header" class="grid page">
        <h2>爱咕噜</h2>
        <h1>你的私信</h1>
    </div>
    <div id="sub-main-header"></div>
    <div id="main-inner" class="account_settings page grid">
        <h4>登录</h4>
        <form action="__GROUP__/login" method="post" class="ajaxform">
            <table class="edit">
                <tr>
                    <td class="label small" width="30%">账号</td>
                    <td><input class="text" type="email" name="account" id="account" required="required" value="" placeholder="邮箱/手机" /></td>
                </tr>
                <tr>
                    <td class="label small">密码</td>
                    <td><input class="text" type="password" placeholder="••••••••" required="required" name="password" id="password" value="" autocomplete="off" /></td>
                </tr>
                <tr>
                    <td class="label small"></td>
                    <td><button class="btn btn_silver fbold" type="submit"><span>登录</span></button>&nbsp;&nbsp;
                        <a href="__GROUP__/reset" class="small">忘记密码</a></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<script>
    Do("validator",function(){
        $("form.ajaxform").validator().submit(function(e){
            var form = $(this);
            if (!e.isDefaultPrevented()) {
                Cute.api.post(form.attr("action"),form.serializeArray(), function(json){
                    if(json.status > 0){
                        location.href = json.data;
                    }else{
                        form.data("validator").invalidate(json.info);
                    }
                });
                e.preventDefault();
            }
        });
    });
</script>
<include file="Public:footer" />
